package fragment.classicfragments;

import android.os.Bundle;
import android.view.View;

import com.android.volley.toolbox.ImageLoader;
import com.android.volley.toolbox.NetworkImageView;
import com.lanou.horo.myapplication.R;

import fragment.AbsBaseFragment;
import volley.VolleySingleton;

/**
 * 分类中有声书点进去的轮播
 * Created by dllo on 15/11/20.
 */
public class ClassifoimgViewpageFragment extends AbsBaseFragment implements View.OnClickListener {
    private NetworkImageView classifoimg_img;
    private ImageLoader imageLoader;


    public static ClassifoimgViewpageFragment claddifoimgViewpageFragment;

    public static ClassifoimgViewpageFragment getInstance(String imgUrl) {
        ClassifoimgViewpageFragment classifoimgViewpageFragment =
                new ClassifoimgViewpageFragment();
        // 参数传递
        Bundle args = new Bundle();
        args.putString("imgUrl", imgUrl);
        classifoimgViewpageFragment.setArguments(args);

        return classifoimgViewpageFragment;
    }


    @Override
    protected int getLayoutView() {
        return R.layout.fragment_classifoimg_viewpage;
    }

    @Override
    protected void initView() {
        classifoimg_img = findView(R.id.classifoimg_img);
        classifoimg_img.setOnClickListener(this);


    }
    String imgUrlq;
    @Override
    protected void initData() {
        imageLoader = VolleySingleton.getInstance().getImageLoader();
        Bundle bundle = this.getArguments();
        if (bundle != null) {
            imgUrlq = bundle.getString("imgUrl");
            classifoimg_img.setImageUrl(imgUrlq,imageLoader);
        }

    }


    //在此处写监听
    @Override
    public void onClick(View v) {
        switch (v.getId()){
            case R.id.classifoimg_img:

                break;
        }



    }
}
